/*
 * Assignment00.asm
 *
 *  Created: 2/6/2015 11:02:06 PM
 *   Author: Jeevake Attapattu
 */ 


.include "M328PDEF.INC" ;include atmega328p device library

		ldi R21, 2
		out DDRB, R21  ;make Port b2 an output port

		;load immidiates
		ldi R16, 32  
		ldi R17, 42
		ldi R18, 53
		ldi R19, 35
		ldi R20, 47
	
		;conduct additions
		add R16, R17
		add R16, R18
		add R16, R19
		add R16, R20

		;if overflow branch to label ovflw
		brvs ovflw

		;if no overflow
		cbi portb, 2 ;set portb 2 to low
		jmp novflw  ;skip portb high command

ovflw:
		sbi portb, 2 ;set portb 2 to high

novflw:
